home *** CD-ROM | disk | FTP | other *** search
- @echo off
- cls
- echo.
- echo This batch file is provide as is. Use it at your own risk.
- echo.
- echo Since it does minimal error checking and there are so many
- echo varables pertaining to how Win95 may be installed, it may
- echo not work on your system.
- echo.
- echo In most cases the worst that can happen is that a directory
- echo named SMALLREG will be created under your WINDOWS directory and
- echo it will not contain a proper set of backup files.
- echo.
- pause Press CTRL-BREAK to cancel, or any other key to proceed at your own risk:
- cls
- if "%1"=="" goto :ERRORMSG
- if "%windir%"=="" goto :WINDIR
- if "%windir%\command"=="" goto :WINDIR
- if not exist %1\*.* goto :BADDRIVE
- if not exist %windir%\*.* goto :BADWINDIR
- if not exist %windir%\system.dat goto :NOWIN
- if not exist %windir%\command\attrib.exe goto :NOATTRIB
- if exist %windir%\smallreg\*.* goto :SMALLREGFILES
- cls
- echo.
- echo.
- echo This batch file will create the directory %windir%\SmallReg
- echo and copy the following files (if they exist) to it as backups.
- echo.
- echo %1\MSDOS.SYS
- echo %windir%\SYSTEM.DAT
- echo %windir%\SYSTEM.DA0
- echo %windir%\USER.DAT
- echo %windir%\USER.DA0
- echo %windir%\SYSTEM.INI
- echo %windir%\WIN.INI
- echo %windir%\ShellIconCache
- echo %windir%\SYSTEM.CB
- echo %windir%\IOS.LOG
- echo %windir%\TTFCACHE
- echo.
- pause Press CTRL-BREAK now to cancel, or any other key to continue:
- md %windir%\SmallReg
- %1
- cd %windir%
- :RESETATTRIB
- if exist %1\msdos.sys %windir%\command\attrib -s -r -h %1\msdos.sys
- if exist %windir%\system.dat %windir%\command\attrib -s -r -h system.dat
- if exist %windir%\system.da0 %windir%\command\attrib -s -r -h system.da0
- if exist %windir%\user.dat %windir%\command\attrib -s -r -h user.dat
- if exist %windir%\user.dat %windir%\command\attrib -s -r -h user.da0
- if exist %windir%\shelli~1 %windir%\command\attrib -h shelli~1
- if exist %windir%\ttfcache %windir%\command\attrib -h ttfcache
- :COPYFILES
- echo.
- echo Copying files now, please wait....
- echo.
- if exist %1\msdos.sys copy %1\msdos.sys smallreg > nul
- if exist %windir%\system.dat copy system.dat smallreg > nul
- if exist %windir%\system.da0 copy system.da0 smallreg > nul
- if exist %windir%\user.dat copy user.dat smallreg > nul
- if exist %windir%\user.da0 copy user.da0 smallreg > nul
- if exist %windir%\system.ini copy system.ini smallreg > nul
- if exist %windir%\win.ini copy win.ini smallreg > nul
- if exist %windir%\shelli~1 copy shelli~1 smallreg > nul
- if exist %windir%\system.cb copy system.cb smallreg > nul
- if exist %windir%\ios.log copy ios.log smallreg > nul
- if exist %windir%\ttfcache copy ttfcache smallreg > nul
- :RESETATTRIB
- if exist %1\msdos.sys %windir%\command\attrib +s +r +h %1\msdos.sys
- if exist %windir%\system.dat %windir%\command\attrib +s +r +h system.dat
- if exist %windir%\system.da0 %windir%\command\attrib +s +r +h system.da0
- if exist %windir%\user.dat %windir%\command\attrib +s +r +h user.dat
- if exist %windir%\user.dat %windir%\command\attrib +s +r +h user.da0
- if exist %windir%\shelli~1 %windir%\command\attrib +h shelli~1
- if exist %windir%\ttfcache %windir%\command\attrib +h ttfcache
- cd %windir%\smallreg
- goto :END
- :BADDRIVE
- cls
- echo.
- echo The drive %1 either does not exist or it contains no files,
- echo are you sure you entered your Drive letter directory correctly.
- goto :ERRORMSG
- :BADWINDIR
- cls
- echo.
- echo The directory %windir% either does not exist or it contains no files,
- goto :END
- :NOWIN
- cls
- echo.
- echo The file SYSTEM.DAT can not be found in %windir%
- goto :END
- :NOATTRIB
- cls
- echo.
- echo This batch file requires ATTRIB.EXE to be in %windir%\COMMAND, but
- echo it could not be found there. Correct the problem and try again.
- goto :END
- :SMALLREGFILES
- cls
- echo.
- echo There are already files in %windir%\SmallReg. For safety reasons,
- echo this batch file will not over write existing files. To continue, you
- echo must manually delete the files in %windir%\SmallReg.
- echo.
- echo Before deleting them make sure you do not need them.
- echo.
- echo If you think that you might need them later, make another directory
- echo and copy them there before deleting them.
- goto :END
- :WINDIR
- echo.
- echo It appears that you are in real DOS mode. This batch file
- echo must be run from within Win95 or a Win95 Dos Window.
- goto :END
- :ERRORMSG
- echo.
- echo Correct syntax is: SMALLBAC d:
- echo.
- echo where d: = Drive (with colon) containing your MSDOS.SYS file
- :END
- echo.
-